import config from "@/config"
import http from "@/utils/request"

export default {
	sendCode: {
		url: `${config.API_URL}/user/sendSmsCode`,
		name: "发送验证码",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	loginByCode: {
		url: `${config.API_URL}/user/loginByCode`,
		name: "验证码登录",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	token: {
		url: `${config.API_URL}/token`,
		name: "登录获取TOKEN",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	refreshToken: {
		url: `${config.API_URL}/token/refreshToken`,
		name: "刷新TOKEN",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
}
